package com.fee1in;


import com.fee1in.pojo.User;

import java.util.List;

public class App {
    public static void main(String[] args) {

        try {
            String resource = "herobatis-config.xml";
            SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().setResource(resource).build();
            SqlSession session = sqlSessionFactory.openSession();
           List<User> users =  session.selectList("com.fee1in.dao.UserMapper.queryUserList");
            users.stream().forEach(e->{
                System.out.println("user,id:"+e.getId()+",name:"+e.getName());
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
